//
//  ComperesNewsTableViewCell.m
//  zhuchiren
//
//  Created by rainday on 15/1/23.
//  Copyright (c) 2015年 rainday. All rights reserved.
//

#import "ComperesNewsTableViewCell.h"
#import <QuartzCore/QuartzCore.h>
#import <ReactiveCocoa.h>
#import <RACEXTScope.h>
#import "MyHomePageViewController.h"

@interface ComperesNewsTableViewCell()
- (IBAction)clickButton:(id)sender;

@end
@implementation ComperesNewsTableViewCell

- (void)awakeFromNib {
    // Initialization code
    self.backgroundColor = [UIColor clearColor];
    _shadowView.layer.shadowColor = [[UIColor blackColor] CGColor];
    _shadowView.layer.shadowOffset = CGSizeMake(2, 2);
    _shadowView.layer.shadowOpacity = 0.3;
    
    _avatarButtom.layer.cornerRadius = 5;
    _avatarButtom.layer.masksToBounds = YES;
    
    @weakify(self);
    [[_avatarButtom rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
        @strongify(self);
        [self.delegate viewUser:_username];
        
        
    }];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)clickButton:(id)sender{
    [_delegate callPhone:_phoneString];
    
}
@end
